#!/usr/bin/python3.4

poem = '''\
Programming is fun
When the work is done
if you wanna make your work also fun:
    use Python!
'''

f = open('test.txt', 'w')
f.write(poem)
f.close()

f = open('test.txt', 'r')
for line in f:
    print(line, end="")
#while True:
#    line = f.readline()
#    if len(line) == 0:
#        break
#    print(line,end="")
f.close()
